import { http, useUploadFile } from "@/api";


export const loginApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/login/wechat_login",
        data,
    });
};

// 账号密码登陆
export const accLoginApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/login/acc_login",
        data,
    });
};

//  手机验证码登陆
export const codeLoginApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/login/sms_login",
        data,
    });
};

// 获取微信用户信息密文解密内容
export function getWechatDecryptApi(data?: any) {
    return http({
        method: "POST",
        url: "index/Login/wxapplogin",
        data,
    });
}

// 解密获取获取手机号
export const getLoginMobileApi = (data?: any) => {
    return http({
        method: "POST",
        url: "index/Login/wxapplogindecrypt",
        data,
    });
};

// 绑定用户手机号
export const bindUserMonbileApi = (data?: any) => {
    return http({
        method: "POST",
        url: "index/login/wxbindmobile",
        data,
    });
};

// 修改用户手机号
export const updateMobileApi = (data?: any) => {
    return http({
        method: "POST",
        url: "index/login/bindMobile",
        data,
    });
};

// 修改登陆密码
export const resetPasswordApi = (data?: any) => {
    return http({
        method: "POST",
        url: "index/login/resetPass",
        data,
    });
};

// 获取用户信息
export const getUserInfoApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/login/getuserinfo",
        data,
    });
};

// 修改用户信息
export const editUserInfoApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/Member/editmemberinfo",
        data,
    });
};

// 设置用户支付密码
export const setPaywordApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/Member/setPayword",
        data,
    });
};

// 设置用户登陆密码
export const setLoginPsdApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/login/phoneCode",
        data,
    });
};

// 获取我的首页数据
export const getIndexApi = (data: any) => {
    return http({
        method: "POST",
        url: "index/member/index",
        data,
    });
};
